package com.lecing.utils;

import java.util.*;

/**
 * 模拟统计出来的数据
 * Created by liucs on 2018/5/24.
 */
public class StatData {
    /**
     * 返还map
     * @param month
     * @return
     */
    public static Map<String,Object> assemLedgerMapData(String month){
        Map<String,Object> ledgerMap=new HashMap<>();
        //表头数据
        ledgerMap.put("$title","乐醒财务-月总账");
        ledgerMap.put("$month",month);

        //表体数据
        ledgerMap.put("$inSum","520000");
        ledgerMap.put("$outSum","32000");
        ledgerMap.put("$mRepaySum","52000");
        ledgerMap.put("$mLoanSum","42000");
        ledgerMap.put("$yRepaySum","32000");
        ledgerMap.put("$yLoanSum","1000");
        ledgerMap.put("$fTopUpSum","2000");
        ledgerMap.put("$fWithdrawCash","2100");
        ledgerMap.put("$cTopUpSum","6000");
        ledgerMap.put("$cWithdrawCash","2000");
        ledgerMap.put("$mRefundSum","1000");
        ledgerMap.put("$fRefundSum","4000");
        ledgerMap.put("$yRefundSum","3000");
        ledgerMap.put("$cRefundSum","1000");
        //余额
        ledgerMap.put("$balance",(Double.parseDouble(ledgerMap.get("$inSum")+"")-Double.parseDouble(ledgerMap.get("$outSum")+""))+"");

        ledgerMap.put("#inSum","收入总和");
        ledgerMap.put("#outSum","支出总和");
        ledgerMap.put("#mRepaySum","月付还款总额");
        ledgerMap.put("#mLoanSum","月付放款总额");
        ledgerMap.put("#yRepaySum","年付还款总额");
        ledgerMap.put("#yLoanSum","年付放款总额");
        ledgerMap.put("#fTopUpSum","公寓充值总额");
        ledgerMap.put("#fWithdrawCash","公寓提现总额");
        ledgerMap.put("#cTopUpSum","租客充值总额");
        ledgerMap.put("#cWithdrawCash","租客提现总额");
        ledgerMap.put("#mRefundSum","月付返款总额");
        ledgerMap.put("#fRefundSum","公寓提现返款总额");
        ledgerMap.put("#yRefundSum","年付返款总额");
        ledgerMap.put("#cRefundSum","租客提现返款总额");
        ledgerMap.put("#balance","余额");

        //表底
        ledgerMap.put("#leader","单位负责人");
        ledgerMap.put("#accountant","会计人员");
        ledgerMap.put("#lister","制表人");
        ledgerMap.put("#tabdate","制表日期");

        ledgerMap.put("$leader","赵显普");
        ledgerMap.put("$accountant","宋世音");
        ledgerMap.put("$lister","娄改丽");
        ledgerMap.put("$tabdate", DateUtil.getCurDate("yyyy-MM-dd"));
        return ledgerMap;
    }
    //组装月付还款列表
    public static  List<Map<String,Object>> assemMRepayList(String month) {
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> headMap=new HashMap<>();
        //表头数据
        headMap.put("#title","乐醒财务-月总账");
        headMap.put("#month","2018年5月");

        headMap.put("#sn","序号");
        headMap.put("#flat","公寓名称");
        headMap.put("#rent","月租金");
        headMap.put("#overdue","逾期费");
        headMap.put("#repaySum","还款总额");
        headMap.put("#realSrvFee","实际服务费");

        Map<String,Object> dataMap=new HashMap<>();
        dataMap.put("$sn",1);
        dataMap.put("$flat","怒醒公寓");
        dataMap.put("$rent",1000);
        dataMap.put("$overdue",500);
        dataMap.put("$repaySum",2000);
        dataMap.put("$realSrvFee",100);

        mapList.add(dataMap);
        return mapList;
    }


    //组装资金计划数据
    public static  List<Map<String,Object>> assemFundsPlanList(String begin,String end){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("flat","河南米客之家信息技术有限公司");
        map1.put("idx",1);
        map1.put("ym",begin);
        map1.put("ypsum",500000);
        map1.put("mpsum",300000);
        map1.put("yrsum",100000);
        map1.put("mrsum",200000);
        map1.put("ypAmount",400000);
        map1.put("mpAmount",100000);
        map1.put("amount",800000);
        mapList.add(map1);
        Map<String,Object> map2=new HashMap<>();
        map2.put("flat","河南怒醒公寓有限公司");
        map2.put("idx",2);
        map2.put("ym","2018年6月");
        map2.put("ypsum",600000);
        map2.put("mpsum",400000);
        map2.put("yrsum",100000);
        map2.put("mrsum",200000);
        map2.put("ypAmount",500000);
        map2.put("mpAmount",200000);
        map2.put("amount",900000);
        mapList.add(map2);
        return  mapList;
    }

    //组装公寓提现凭证列表
    public static List<Map<String,Object>> assemFlatWithdrawVou(){
        List<Map<String,Object>> mapList1=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
//        map1.put("payAccount","中原银行郑州曼哈顿支行");
        map1.put("payAccNum","410103010150009701");
        map1.put("payAmount",10000);

        map1.put("flat","河南怒醒公寓管理有限公司");
        map1.put("recAccNum","76080154800007397");
        map1.put("recBank","中原银行郑州曼哈顿支行");
        map1.put("recAmount",map1.get("payAmount"));
        map1.put("traDate","2018-05-22");
        mapList1.add(map1);

        return  mapList1;
    }
    //组装公寓充值凭证列表
    public static List<Map<String,Object>> assemFlatTopupVou(){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("flat","河南怒醒公寓管理有限公司");
        map1.put("payAccount","中原银行郑州曼哈顿支行");
        map1.put("payAccNum","76080154800007397");
        map1.put("payAmount",10000);

        map1.put("recAccNum","410103010150009701");
        map1.put("recAmount",map1.get("payAmount"));
        map1.put("traDate","2018-05-21");
        mapList.add(map1);

        return  mapList;
    }


    //组装公寓充值交易日明细
    public static List<Map<String,Object>> assemFlatTopupList(){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("idx",1);
        map1.put("tc","10000001");
        map1.put("topupSum",1500);
        Map<String,Object> map2=new HashMap<>();
        map2.put("idx",2);
        map2.put("tc","10000002");
        map2.put("topupSum",2500);
        Map<String,Object> map3=new HashMap<>();
        map3.put("idx",3);
        map3.put("tc","10000003");
        map3.put("topupSum",2500);
        Map<String,Object> map4=new HashMap<>();
        map4.put("idx",4);
        map4.put("tc","10000004");
        map4.put("topupSum",3500);

        mapList.add(map1);mapList.add(map2);mapList.add(map3);mapList.add(map4);
        return mapList;
    }

    //月付日放款凭证
    public static List<Map<String,Object>> assemMLoanVou4Day(){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("payAccount","乐醒宝付账户");
        map1.put("payAccNum","410103010150009701");
        map1.put("payAmount",10000);

        map1.put("recFlat","河南米加公寓管理有限公司");
        map1.put("recAccNum","76080154800007397");
        map1.put("recBank","中原银行郑州曼哈顿支行");
        map1.put("recAmount",10000);

        map1.put("traDate","2018-05-20");
        map1.put("tc","1805021640T0003");

        mapList.add(map1);

        Map<String,Object> map2=new HashMap<>();
        map2.put("payAccount","乐醒宝付账户");
        map2.put("payAccNum","410103010150009701");
        map2.put("payAmount",200000);

        map2.put("recFlat","河南墨菲公寓管理有限公司");
        map2.put("recAccNum","76080154800007398");
        map2.put("recBank","中原银行郑州曼哈顿支行");
        map2.put("recAmount",200000);

        map2.put("traDate","2018-05-20");
        map2.put("tc","1805021640T0004");

        mapList.add(map2);
        return  mapList;
    }

    //年付放款日交流列表
    public static List<Map<String,Object>> assemDay4YTraList(String traDate,String tc){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("idx",1);
        map1.put("renter","房东甲");
        map1.put("tsn","1800002130");
        map1.put("amount",25000);
        mapList.add(map1);

        Map<String,Object> map2=new HashMap<>();
        map2.put("idx",2);
        map2.put("renter","房东乙");
        map2.put("tsn","1800002131");
        map2.put("amount",50000);
        mapList.add(map2);

        Map<String,Object> map3=new HashMap<>();
        map3.put("idx",3);
        map3.put("renter","房东丙");
        map3.put("tsn","1800002132");
        map3.put("amount",35000);
        mapList.add(map3);

        return mapList;
    }

    //查询日放款租客交租计划
    public static List<Map<String,Object>> assemDayTraList(String traDate,String tc){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("idx",1);
        map1.put("tenant","张三");
        map1.put("tsn","1800000124");
        map1.put("mons",5);
        map1.put("rent",2500);
        map1.put("svFee",500);
        map1.put("amount",3000);
        mapList.add(map1);

        Map<String,Object> map2=new HashMap<>();
        map2.put("idx",2);
        map2.put("tenant","李四");
        map2.put("tsn","1800000125");
        map2.put("mons",6);
        map2.put("rent",3000);
        map2.put("svFee",500);
        map2.put("amount",3500);
        mapList.add(map2);

        Map<String,Object> map3=new HashMap<>();
        map3.put("idx",3);
        map3.put("tenant","王五");
        map3.put("tsn","1800000126");
        map3.put("mons",7);
        map3.put("rent",3100);
        map3.put("svFee",400);
        map3.put("amount",3500);
        mapList.add(map3);

        return  mapList;
    }
    //月付放款月表
    public static List<Map<String,Object>> assemMLoanLst(String month){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("sn",1);
        map1.put("flat","怒醒公寓");
        map1.put("loanAmount",600000);
        map1.put("preRecServFee",1000);
        map1.put("realLoanAmount",600000-1000);
        mapList.add(map1);
        Map<String,Object> map2=new HashMap<>();
        map2.put("sn",2);
        map2.put("flat","米加公寓");
        map2.put("loanAmount",580000);
        map2.put("preRecServFee",1500);
        map2.put("realLoanAmount",580000-1500);
        mapList.add(map2);

        return mapList;
    }

    //年付放款月表
    public static List<Map<String,Object>> assemYLoanLst(String month){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("sn",1);
        map1.put("flat","怒醒公寓");
        map1.put("loanAmount",705000);
        Map<String,Object> map2=new HashMap<>();
        map2.put("sn",2);
        map2.put("flat","米加公寓");
        map2.put("loanAmount",680000);
        Map<String,Object> map3=new HashMap<>();
        map3.put("sn",3);
        map3.put("flat","魔法公寓");
        map3.put("loanAmount",480000);
        Map<String,Object> map4=new HashMap<>();
        map4.put("sn",4);
        map4.put("flat","乐醒公寓");
        map4.put("loanAmount",580000);

        mapList.add(map1);mapList.add(map2);mapList.add(map3);mapList.add(map4);
        return mapList;
    }

    //年付违约返款数据
    public static List<Map<String,Object>> assemYPayRefundDataList(String staMonth){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("sn",1);
        map1.put("flat","怒醒公寓");
        map1.put("funds",4500000);
        map1.put("penalSum",3800);
        map1.put("overdueFee",1600);
        double refundSum=4500000+3800+1600; //返款总额=本金金额+违约金+滞纳金
        map1.put("refundSum",refundSum);
        mapList.add(map1);

        Map<String,Object> map2=new HashMap<>();
        map2.put("sn",2);
        map2.put("flat","米加公寓");
        map2.put("funds",5500000);
        map2.put("penalSum",4800);
        map2.put("overdueFee",2600);
        double refundSum1=5500000+4800+2600; //返款总额=本金金额+违约金+滞纳金
        map2.put("refundSum",refundSum1);
        mapList.add(map2);

        return  mapList;
    }
    //月付违约返款数据
    public static List<Map<String,Object>> assemMPayRefundDataList(String staMonth){
        List<Map<String,Object>> mapList=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("sn",1);
        map1.put("flat","怒醒公寓");
        map1.put("funds",36000000);
        map1.put("demurrage",360000);
        map1.put("penalSum",16000);
        map1.put("overdueFee",28000);
        map1.put("retServFee",350000);
        map1.put("realServFee",30500);
        double retAmount=36000000+360000+16000+28000+30500-350000;
        map1.put("refundSum",retAmount);
        mapList.add(map1);

        Map<String,Object> map2=new HashMap<>();
        map2.put("sn",2);
        map2.put("flat","米加公寓");
        map2.put("funds",5600000);
        map2.put("demurrage",36000);
        map2.put("penalSum",16000);
        map2.put("overdueFee",28000);
        map2.put("retServFee",350000);
        map2.put("realServFee",30500);
        double retAmount2=5600000+36000+16000+28000+30500-350000;
        map2.put("refundSum",retAmount2);
        mapList.add(map2);

        return mapList;
    }
}
